#ifndef RESULT_SAVER_H
#define RESULT_SAVER_H

#include "algohub_export.h"
#include "algohub_common_type.h"
#include <string>
#include <vector>

namespace algo 
{
    class ALGOHUB_EXPORT ResultSaver 
    {
    public:
        static void saveResults(
            const algobase::Paths& initial_paths,
            const std::vector<algobase::FinalPathScore>& optimized_paths,
            const algobase::TaskConfig& config
        );

    private:
        static std::string getCurrentTimestamp();
        static void writePathFile(
            const std::string& filepath,
            const algobase::Path& path
        );
        static void writeTrajectoryFile(
            const std::string& filepath,
            const algobase::FinalPathScore& trajectory
        );
        static void writePlanFile(
            const std::string& filepath,
            const algobase::FinalPathScore& trajectory,
            const algobase::TaskConfig& config
        );
    };
}

using namespace algo;

#endif // RESULT_SAVER_H